package com.oig.auth.api.factory;

import com.oig.auth.api.ResourceDataCfgService;
import com.oig.auth.api.fallback.ResourceDataCfgServiceFallbackImpl;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class ResourceDataCfgFallBackFactory implements FallbackFactory<ResourceDataCfgService> {

    @Override
    public ResourceDataCfgService create(Throwable cause) {
        ResourceDataCfgServiceFallbackImpl resourceDataCfgServiceFallback = new ResourceDataCfgServiceFallbackImpl();
        resourceDataCfgServiceFallback.setCause(cause);
        return resourceDataCfgServiceFallback;
    }

}
